#pragma once
#include<iostream>
#include<assert.h>
using namespace std;
class Data {
	friend ostream& operator<<(ostream& out, const Data& d);
	friend istream& operator>>(istream& in,Data& d);
public:
	Data(int year = 2024, int month = 9, int day = 11);
	bool ChackData();
	int GetMonthDay()const;
	bool operator<(const Data& d)const;
	bool operator>(const Data& d)const;
	bool operator>=(const Data& d)const;
	bool operator<=(const Data& d)const;
	bool operator==(const Data& d)const;
	bool operator!=(const Data& d)const;
	Data& operator+=(const int day);
	Data& operator+(const int day)const;
	Data& operator-=(const int day);
	Data& operator-(const int day)const;
	Data& operator++();
	Data operator++(int);
	Data& operator--();
	Data operator--(int);

	int operator-(const Data& d)const;
	void print()const;
private:
	int _year;
	int _month;
	int _day;
};
ostream& operator<<(ostream& out, const Data& d);
istream& operator>>(istream& in, const Data& d);